package com.smfx.yxt.daoSqlserver;

import java.util.List;
import java.util.Map;

import com.smfx.yxt.model.AttachmentList;
import com.smfx.yxt.page.Page;
import com.smfx.yxt.reqVo.AttachRelationReqVO;

public interface AttachmentListMapper {

    int insertSelective(AttachmentList record);

    AttachmentList selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AttachmentList record);

	List<AttachmentList> selectByPage(Page<AttachmentList> page);
	
	/**
	 * 更新附件关联id
	 * @param record
	 * @return
	 */
	int updateRelationId(AttachmentList record);
	
	/**
	 * 查询老师上传的预附件数量
	 * @param teacherId
	 * @return
	 */
	int selectHandingCountByTeacherId(AttachmentList record);
	
	/**
	 * 查询老师上传的预附件列表
	 * @param record
	 * @return
	 */
	List<AttachmentList> selectHandingList(AttachmentList record);
	
	int selectCountByParam(AttachmentList record);
	
	/**
	 * 根据附件id更新附件关联id
	 * @param reqVO
	 * @return
	 */
	int updateRelationIdByIds(AttachRelationReqVO reqVO);
	
	/**
	 * 根据关联关系查询附件列表
	 * @param map
	 * @return
	 */
	List<AttachmentList> queryAttachmentListByRelationId(Map<String, Object> map);
	/**
	 * 根据附件上传人角色查询列表
	 * @param map
	 * @return
	 */
	List<AttachmentList> queryAttachmentListByRole(Map<String, Object> map);
	/**
	 * 根据附件id反向失效附件
	 * @param reqVO
	 * @return
	 */
	int updateInvaildForRevByIds(AttachRelationReqVO reqVO);
}